-- GENERATED SPELL FOR [Nether Sorceress] --


function spell0_4684(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_4684', 8331, 1)
end

function spell1_4684(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20297,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4684', 7000, 1)
end

function spell2_4684(pUnit, Event) --@Lash of Pain,n/a--
pUnit:FullCastSpellOnTarget(15968,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4684', 656, 1)
end

function Sorts_4684(pUnit, Event)
local choix_sorts_4684 = math.random(0, 2)
if choix_sorts_4684 == 0 then
pUnit:RegisterEvent('spell0_4684', 1, 1)
end
if choix_sorts_4684 == 1 then
pUnit:RegisterEvent('spell1_4684', 1, 1)
end
if choix_sorts_4684 == 2 then
pUnit:RegisterEvent('spell2_4684', 1, 1)
end
end

function mob4684_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4684', math.random(1500, 3000), 1)
end

function mob4684_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4684_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4684_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4684, 1, 'mob4684_Action')
RegisterUnitEvent(4684, 2, 'mob4684_Leave')
RegisterUnitEvent(4684, 3, 'mob4684_Kill')
RegisterUnitEvent(4684, 4, 'mob4684_Die')
